Skip to content

Technical review: Document scroll-triggered animations#43158

Open
chrisdavidmills wants to merge 51 commits intomdn:mainfrom
chrisdavidmills:scroll-triggered-animations
Open

Technical review: Document scroll-triggered animations#43158
chrisdavidmills wants to merge 51 commits intomdn:mainfrom
chrisdavidmills:scroll-triggered-animations

Conversation

@chrisdavidmills
Copy link
Contributor

@chrisdavidmills chrisdavidmills commented Feb 18, 2026

Description

Chrome 146 adds support for scroll-triggered animations; see https://chromestatus.com/feature/5181996801982464.

This PR adds documentation for this new feature, including:

  • A module page for the new Animation triggers module.
  • A guide that explains and demonstrates all the important sub-features.
  • Ref page for the animation-trigger property.
  • Ref page for the <animation-action> type.
  • Ref page for the trigger-scope property.
  • Ref page for the timeline-trigger shorthand property.
  • Ref page for the timeline-trigger-name property.
  • Ref page for the timeline-trigger-source property.
  • Ref page for the timeline-trigger-activation-range shorthand property.
  • Ref page for the timeline-trigger-activation-range-start property.
  • Ref page for the timeline-trigger-activation-range-end property.
  • Ref page for the timeline-trigger-active-range shorthand property.
  • Ref page for the time-trigger-active-range-start property.
  • Ref page for the time-trigger-active-range-end property.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills chrisdavidmills requested a review from a team as a code owner February 18, 2026 16:51
@chrisdavidmills chrisdavidmills requested review from hamishwillee and removed request for a team and hamishwillee February 18, 2026 16:51
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Feb 18, 2026
@chrisdavidmills chrisdavidmills changed the title Document scroll-triggered animations Technical review: Document scroll-triggered animations Feb 18, 2026
@github-actions github-actions bot added the size/xl [PR only] >1000 LoC changed label Feb 18, 2026
@chrisdavidmills chrisdavidmills marked this pull request as draft February 18, 2026 16:51
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

Preview URLs (18 pages)
Flaws (79)

Note! 6 documents with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/CSS/Reference/Properties/animation
Title: animation
Flaw count: 16

  • broken_links:
    • Link /en-US/docs/Web/CSS/animation-duration is a redirect
    • Link /en-US/docs/Web/CSS/animation-delay is a redirect
    • Link /en-US/docs/Web/CSS/time is a redirect
    • Link /en-US/docs/Web/CSS/time is a redirect
    • Link /en-US/docs/Web/CSS/number is a redirect
    • and 11 more flaws omitted

URL: /en-US/docs/Web/CSS/Reference/Properties/animation-trigger
Title: animation-trigger CSS property
Flaw count: 2

  • broken_links:
    • Link /en-US/docs/Web/CSS/dashed-ident is a redirect
    • Link /en-US/docs/Web/CSS/animation-action doesn't resolve

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger
Title: timeline-trigger CSS property
Flaw count: 31

  • broken_links:
    • Link /en-US/docs/Web/CSS/timeline-trigger-name doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-trigger-source doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-trigger-activation-range doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-trigger-active-range doesn't resolve
    • Link /en-US/docs/Web/CSS/dashed-ident is a redirect
    • and 12 more flaws omitted
  • macros:
    • Macro cssinfo produces link /en-US/docs/Web/CSS/timeline-trigger-range-start which doesn't resolve
    • Macro cssinfo produces link /en-US/docs/Web/CSS/timeline-trigger-range-end which doesn't resolve
    • Macro cssinfo produces link /en-US/docs/Web/CSS/timeline-trigger-exit-range-start which doesn't resolve
    • Macro cssinfo produces link /en-US/docs/Web/CSS/timeline-trigger-exit-range-end which doesn't resolve
    • Macro cssinfo produces link /en-US/docs/Web/CSS/timeline-trigger-range which doesn't resolve
    • and 9 more flaws omitted

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger-activation-range
Title: timeline-trigger-activation-range CSS property
Flaw count: 6

  • broken_links:
    • Link /en-US/docs/Web/CSS/timeline-trigger-activation-range-start doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-trigger-activation-range-end doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-range-name doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-range-name doesn't resolve
    • Link /en-US/docs/Web/CSS/length is a redirect
    • and 1 more flaws omitted

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger-activation-range-end
Title: timeline-trigger-activation-range-end CSS property
Flaw count: 3

  • broken_links:
    • Link /en-US/docs/Web/CSS/timeline-range-name doesn't resolve
    • Link /en-US/docs/Web/CSS/length is a redirect
    • Link /en-US/docs/Web/CSS/percentage is a redirect

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger-activation-range-start
Title: timeline-trigger-activation-range-start CSS property
Flaw count: 3

  • broken_links:
    • Link /en-US/docs/Web/CSS/timeline-range-name doesn't resolve
    • Link /en-US/docs/Web/CSS/length is a redirect
    • Link /en-US/docs/Web/CSS/percentage is a redirect

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger-active-range
Title: timeline-trigger-active-range CSS property
Flaw count: 6

  • broken_links:
    • Link /en-US/docs/Web/CSS/timeline-trigger-active-range-start doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-trigger-active-range-end doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-range-name doesn't resolve
    • Link /en-US/docs/Web/CSS/timeline-range-name doesn't resolve
    • Link /en-US/docs/Web/CSS/length is a redirect
    • and 1 more flaws omitted

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger-active-range-end
Title: timeline-trigger-active-range-end CSS property
Flaw count: 3

  • broken_links:
    • Link /en-US/docs/Web/CSS/timeline-range-name doesn't resolve
    • Link /en-US/docs/Web/CSS/length is a redirect
    • Link /en-US/docs/Web/CSS/percentage is a redirect

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger-active-range-start
Title: timeline-trigger-active-range-start CSS property
Flaw count: 3

  • broken_links:
    • Link /en-US/docs/Web/CSS/timeline-range-name doesn't resolve
    • Link /en-US/docs/Web/CSS/length is a redirect
    • Link /en-US/docs/Web/CSS/percentage is a redirect

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger-name
Title: timeline-trigger-name CSS property
Flaw count: 1

  • broken_links:
    • Link /en-US/docs/Web/CSS/dashed-ident is a redirect

URL: /en-US/docs/Web/CSS/Reference/Properties/timeline-trigger-source
Title: timeline-trigger-source CSS property
Flaw count: 4

  • broken_links:
    • Link /en-US/docs/Web/CSS/dashed-ident is a redirect
    • Link /en-US/docs/Web/CSS/view-timeline-inset is a redirect
    • Link /en-US/docs/Web/CSS/length is a redirect
    • Link /en-US/docs/Web/CSS/percentage is a redirect

URL: /en-US/docs/Web/CSS/Reference/Properties/trigger-scope
Title: trigger-scope CSS property
Flaw count: 1

  • broken_links:
    • Link /en-US/docs/Web/CSS/dashed-ident is a redirect
External URLs (2)

URL: /en-US/docs/Web/CSS/Guides/Animation_triggers
Title: CSS animation triggers


URL: /en-US/docs/Web/CSS/Guides/Animation_triggers/Using_scroll-triggered_animations
Title: Using CSS scroll-triggered animations

(comment last updated: 2026-03-11 09:41:26)

@chrisdavidmills chrisdavidmills marked this pull request as ready for review March 2, 2026 18:02
Copy link
Contributor

@bramus bramus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m halfway through reviewing but already submitting my comments as I see there are some terms that are getting used in places where they should not be.

The themes I am seeing, where wrong names are use:

  • A trigger vs an animation becoming active / inactive: it is the trigger that becomes active / inactive. Animations will do something (play, pause, etc) in response to that trigger becoming active / inactive.

  • An element being a trigger vs a ViewTimeline being a trigger: it is the ViewTimeline that is the trigger, not the element itself.

I’m seeing these terms (trigger / animation / element) get mixed up through all files I reviewed.

Files I did not review, but most likely also have this mixup:

  • files/en-us/web/css/reference/properties/timeline-trigger-active-range-end/index.md
  • files/en-us/web/css/reference/properties/timeline-trigger-activation-range/index.md
  • files/en-us/web/css/reference/properties/timeline-trigger-active-range-start/index.md
  • files/en-us/web/css/reference/properties/timeline-trigger-active-range/index.md
  • files/en-us/web/css/reference/properties/timeline-trigger-name/index.md
  • files/en-us/web/css/reference/properties/timeline-trigger-source/index.md
  • files/en-us/web/css/reference/properties/timeline-trigger/index.md
  • files/en-us/web/css/reference/properties/trigger-scope/index.md

All other files I have reviewed, and left suggestions that you can immediately apply.

I can do a second review round later, but currently I’m overly busy with some other things.

sidebar: cssref
---

**CSS scroll-triggered animations** provide a declarative mechanism to trigger [CSS animations](/en-US/docs/Web/CSS/Guides/Animations) when an element enters a specific activation range inside a parent element's scrollport.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “when an element enters a specific activation range inside a parent element's scrollport.” is not entirely correct, as your trigger-source can also be a ScrollTimeline instead of a ViewTimeline.

See https://codepen.io/bramus/pen/NPRNgBK/817c74a7415e6162d65208a408c8aab2 for a demo, where I use the following trigger:

timeline-trigger: --t scroll() 500px;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated


A very common UI pattern involves triggering animations on a web page when the user scrolls to a certain place in the content, for example to pull in additional UI elements or draw the user's attention to certain details.

The CSS scroll-triggered animations feature provides a declarative mechanism for creating such effects, providing an alternative to using JavaScript features such as the [Intersection Observer API](/en-US/docs/Web/API/Intersection_Observer_API). Depending on which JavaScript mechanism you are currently using, CSS scroll-triggered animations may also be simpler to implement and/or more performant.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this nuance at the end!

- To stop this happening, we set an {{cssxref("animation-trigger")}} value on the animated element. This includes a {{cssxref("dashed-ident")}} name, `--t`, which is equal to the {{cssxref("timeline-trigger-name")}} of the element that will trigger the animation, and two {{cssxref("&lt;animation-action>")}} values, which specify how the animation should behave when the trigger is activated (the animation plays forwards) and deactivated (the animation plays backwards).
> [!NOTE]
> `animation-trigger` is a reset-only sub-property of the `animation` shorthand property. You can't provide an `animation-trigger` value inside `animation`; instead `animation` resets `animation-trigger` to its initial value of `none`. For this reason, you should always set `animation-trigger` after a corresponding `animation` property in a declaration list.
- Next, we set the `timeline-trigger-name` property with a value of `--t` to specify that the `<figure>` element will be the element that will trigger the animation, as well as being the element that is animated. This means that the `<figure>` element will animate when it is scrolled to a certain position inside the scrollport. It is possible for the trigger element to be different to the element that is animated; see [Setting the trigger to a different element](#setting_the_trigger_to_a_different_element), later on.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“we set the timeline-trigger-name property with a value of --t to specify that the <figure> element will be the element that will trigger the animation” is not correct.

To specify that (the trigger attached to) the <figure> element will be the trigger for the animation, the animation-trigger property is used.

The timeline-trigger-name here only gives the created timeline-trigger a name, nothing more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried updating it. This stuff really is complex to describe...whew!

> The `timeline-trigger-activation-range` property can also be set via the {{cssxref("timeline-trigger")}} shorthand property.

> [!NOTE]
> It is possible for the animated element and the trigger element to be the same element.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark about the term “trigger element”

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

}
```

In this case, the animation will be triggered by the trigger element with the `timeline-trigger-name` of `--my-trigger`. Its {{cssxref("animation-action")}} keywords — `play-forwards play-backwards` — specify that the animation should play forwards on activation, and backwards on deactivation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remarks about:

  • The animation is not getting triggered, but the trigger is. When that trigger becomes active (or inactive), the animation will do something.
  • The use of the term “trigger element”

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


The animated {{htmlelement("div")}} element has an `animation` applied that rotates it. We set an {{cssxref("animation-trigger")}} value on it that references a trigger name of `--t`; we also specify two {{cssxref("animation-action")}} values — `play` and `pause` — which specify that the animation will play on activation, and pause on deactivation.

The trigger `<div>` element is defined as the animated `<div>`'s trigger using a {{cssxref("timeline-trigger-name")}} value of `--t`, which is equal to the identifier referenced in the animated `<div>`'s `animation-trigger` property value, associating the two together. It also includes a {{cssxref("timeline-trigger-source")}} value of [`view()`](/en-US/docs/Web/CSS/Reference/Properties/animation-timeline/view), which sets the element providing the view progress timeline as the nearest scrolling ancestor element.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark as with previous occurrences of this sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

chrisdavidmills and others added 30 commits March 10, 2026 10:04
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ggered_animations/index.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…ex.md

Co-authored-by: Bramus <bramus@bram.us>
…vation-range-end/index.md

Co-authored-by: Bramus <bramus@bram.us>
…vation-range-start/index.md

Co-authored-by: Bramus <bramus@bram.us>
…vation-range/index.md

Co-authored-by: Bramus <bramus@bram.us>
…vation-range/index.md

Co-authored-by: Bramus <bramus@bram.us>
…vation-range/index.md

Co-authored-by: Bramus <bramus@bram.us>
…vation-range/index.md

Co-authored-by: Bramus <bramus@bram.us>
…vation-range/index.md

Co-authored-by: Bramus <bramus@bram.us>
…vation-range/index.md

Co-authored-by: Bramus <bramus@bram.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/xl [PR only] >1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants